<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>仪器信息</title>
		<link rel="stylesheet" href="css/tables.css" type="text/css"></link>
		<%@ include file="common/meta.jsp"%>
		<script type="text/javascript" src="js/My97DatePicker/lang/zh-cn.js"></script>
		<script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
		<script type="text/javascript" src="js/apparatusDetail.js" charset="UTF-8"></script>
		<script type="text/javascript" src="js/queryDetailAppointmentsHistory.js" charset="UTF-8"></script>

		<style type="text/css">
.tab_b {
	border: 1px solid #BED1E2;
	border-collapse: collapse;
}
</style>
	</head>

	<body>
		<div class="juzhong">
			<div class="top">
				<jsp:include page="common/head.jsp"></jsp:include>
			</div>
			<div class="main_2">

				<div class="left_2">
					<%@ include file="leftUserInfo.jsp"%>
				</div>

				<div class="right_2">
					<div class="right_nr">
						<div class="right_title">
							<span style="float: left;"><strong>${apparatusVo.title}</strong> </span>
							<span style="float: right;">预约情况： <b><a style="cursor: hand" class="lk" id="historyInfo">【历史预约】</a> </b> <s:if
									test="#request.apparatusVo.isNeedOrder == 0">
									<b>不需要</b>
								</s:if> <s:elseif test="#request.apparatusVo.isNeedOrder == 1">
									<s:if test="#session.loginer.isCheck == 1 && #session.loginer.empType < 4">
										<s:if test="#session.loginer.cardNo != null  && #session.loginer.cardNo.length() > 0">

											<s:if test="#session.loginer.userType <= #request.apparatusVo.openType">
												<s:if test="#request.apparatusVo.openType < 3">
													<b><a style="cursor: hand" class="lk" id="order" loginer="${loginer.loginAccount}">【预约】</a> </b>
												</s:if>
											</s:if>
											<s:else>
											   无权限
											</s:else>
										</s:if>
									</s:if>
								</s:elseif> </span>
							<div class="clear"></div>
						</div>

						<div class="jieshao">
							<div class="jieshao_nr_2">
								<div class="jieshao_nr_2_title" style="font-size: 14px">
									仪器信息：
								</div>
								<div class="jieshao_nr_2_nr" appCode="${apparatusVo.appCode}" id="apparatusInfo">
									<table width="100%" class="tab_border">
										<tr>
											<td width="19%">
												<b>仪器名称：</b>
											</td>
											<td>
												${apparatusVo.name}
											</td>

											<td width="19%">
												<b>使用限制：</b>
											</td>
											<td width="25%">
												<s:if test="#request.apparatusVo.openType == 0">院内开放</s:if>
												<s:elseif test="#request.apparatusVo.openType == 1">校内开放</s:elseif>
												<s:elseif test="#request.apparatusVo.openType == 2">对外开放</s:elseif>
												<s:elseif test="#request.apparatusVo.openType == 3">人工预约</s:elseif>
												<s:else>暂不可用</s:else>
											</td>
										</tr>

										<tr>
											<td width="19%">
												<b>型&nbsp;&nbsp;&nbsp;号：</b>
											</td>
											<td>
												${apparatusVo.model}
											</td>

											<td width="19%">
												<b>厂&nbsp;&nbsp;&nbsp;商：</b>
											</td>
											<td>
												${apparatusVo.supplier}
											</td>
										</tr>


										<tr>
											<td width="19%">
												<b>检索关键词：</b>
											</td>
											<td>
												${apparatusVo.schVar }
											</td>

											<td width="19%">
												<b>仪器价值：</b>
											</td>
											<td>
												${apparatusVo.value}元
											</td>
										</tr>

										<tr>
											<td width="19%">
												<b>使用类型：</b>
											</td>
											<td>
												<s:if test="#request.apparatusVo.useType == 0">自主操作并自备材料</s:if>
												<s:elseif test="#request.apparatusVo.useType == 1">自主操作</s:elseif>
												<s:elseif test="#request.apparatusVo.useType == 2">委托检测</s:elseif>
												<s:elseif test="#request.apparatusVo.useType == 3">不可用</s:elseif>
												<s:else>未知</s:else>
											</td>

											<td width="19%">
												<b>是否需要预约：</b>
											</td>
											<td>
												<s:if test="#request.apparatusVo.isNeedOrder == 0">不需要</s:if>
												<s:elseif test="#request.apparatusVo.isNeedOrder == 1">需要</s:elseif>
											</td>
										</tr>

										<tr>
											<td width="19%">
												<b>简&nbsp;&nbsp;&nbsp;介：</b>
											</td>
											<td colspan="3">
												${apparatusVo.schVar }
											</td>
										</tr>

									</table>
								</div>
							</div>

							<div class="jieshao_nr_2">
								<div class="jieshao_nr_2_title" style="font-size: 14px">
									性能指标：
								</div>
								<div class="jieshao_nr_2_nr">
									${apparatusVo.perFigure }
								</div>
							</div>

							<div class="jieshao_nr_2">
								<div class="jieshao_nr_2_title" style="font-size: 14px">
									使用范围：
								</div>
								<div class="jieshao_nr_2_nr">
									${apparatusVo.applicable }
								</div>
							</div>

							<s:iterator value="peijians.keySet()" id="peijian">
								<div class="jieshao_nr_2">
									<div class="jieshao_nr_2_title" style="font-size: 14px">
										<s:property value="#peijian" />
									</div>
									<div class="jieshao_nr_2_nr">
										<s:iterator value="peijians.get(#peijian)" status="st" id="pj">
											<table width="100%" class="tab_border">
												<tr>
													<td width="10%">
														标题：
													</td>
													<td width="40%">
														<label>
															${title}
														</label>
													</td>

													<td width="12%">
														上传者：
													</td>
													<td>
														<label>
															${origin}
														</label>
													</td>

													<td width="14%">
														上传时间：
													</td>
													<td>
														<label>
															${uploadTime}
														</label>
													</td>
												</tr>

												<tr>
													<td width="10%">
														介绍：
													</td>
													<td colspan="5">
														${introduction}
													</td>
												</tr>
												<tr>
													<td width="10%">
														附件：
													</td>
													<td colspan="3">
														<a href="download.action?id=${id }">${attachment}</a>
													</td>
													<td>
														下载次数：
													</td>
													<td>
														${downLoadCount}
													</td>
												</tr>
											</table>
											<br />
										</s:iterator>
									</div>
								</div>
							</s:iterator>
						</div>
					</div>
				</div>
				<div class="clear"></div>
			</div>
			<div class="bottom">
				<div class="bottom_left">
					<a href="#">联系我们</a> |
					<a href="#">在线咨询</a> |
					<a href="#">网站地图</a> |
					<a href="#">官方博客</a> |
					<a href="#">隐私声明</a>
				</div>
				<div class="bottom_right">
					地址：中国上海 邮政编码：200000 沪ICP备案号00000000号
				</div>
			</div>
		</div>


		<div id="toBook" class="easyui-window" title="预约" style="width: 760px; top: 70px" minimizable="false" maximizable="false"
			closable="true" closed="true">
			<table id="goToBook" style="margin: 1; padding: 1" class="tab_border" width="100%">
				<s:if test="#request.apparatusVo.startTime1 != ''">
					<tr>
						<td colspan="4">
							<b>系统限制预约时间：</b>
						</td>
					</tr>

					<tr>
						<td width="20%">
							预约限制时间1开始：
						</td>
						<td>
							${apparatusVo.startTime1 }
						</td>
						<td width="20%">
							预约结束时间1结束：
						</td>
						<td>
							${apparatusVo.endTime1 }
						</td>
					</tr>
				</s:if>

				<s:if test="#request.apparatusVo.startTime2 != ''">
					<tr>
						<td width="20%">
							预约限制时间2开始：
						</td>
						<td>
							${apparatusVo.startTime2 }
						</td>
						<td width="20%">
							预约结束时间2结束：
						</td>
						<td>
							${apparatusVo.endTime2 }
						</td>
					</tr>
				</s:if>

				<s:if test="#request.apparatusVo.startTime3 != ''">
					<tr>
						<td width="20%">
							预约限制时间3开始：
						</td>
						<td>
							${apparatusVo.startTime3}
						</td>
						<td width="20%">
							预约结束时间3开始：
						</td>
						<td>
							${apparatusVo.endTime3 }
						</td>
					</tr>
				</s:if>

				<tr style="border-bottom-color: none">
					<td colspan="4">
						<b>预约记录：</b>
					</td>
				</tr>
			</table>

			<table id="forAppointmentTables" width="100%">
			</table>

			<table class="tab_border" width="100%">
				<tr>
					<td colspan="4">
						<b>请选择预约时间(最大预约时间为7天)：</b>
					</td>
				</tr>
				<tr>
					<td width="20%">
						预约开始时间：
					</td>
					<td width="30%">
						<input type="text" id="startTime" name="startTime" class="Wdate"
							onFocus="WdatePicker({
								dateFmt:'yyyy-MM-dd HH:mm:00',
								minDate:'#F{\'%y-%M-%d %H:%mm:00\' && $dp.$D(\'endTime\',{d:-7})}', 
								maxDate:'#F{$dp.$D(\'endTime\')}'
							})">
					</td>
					<td width="20%">
						预约结束时间：
					</td>
					<td width="30%">
						<input type="text" id="endTime" name="endTime" class="Wdate"
							onFocus="WdatePicker({
								dateFmt:'yyyy-MM-dd HH:mm:00',
								minDate:'#F{$dp.$D(\'startTime\')}' , 
								maxDate:'#F{$dp.$D(\'startTime\',{d:7});}'
							})">
					</td>
				</tr>

				<tr>
					<td>
						备注：
					</td>
					<td colspan="3">
						<input type="text" style="width: 100%" id="remark" name="remark">
					</td>
				</tr>

				<tr>
					<td colspan="4" align="center">
						<a id="sure" class="easyui-linkbutton" iconCls="icon-ok" appcode="${apparatusVo.appCode}">预约</a> &nbsp;&nbsp;
						<a id="cancleBook" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
					</td>
				</tr>
			</table>
		</div>

		<div id="historyWin" class="easyui-window" title="预约详情 - ${apparatusVo.name}" style="width: 800px; top: 70px" minimizable="false" maximizable="false"
			closable="true" closed="true">
			<table class="tab_border" width="100%">
				<caption style="text-align: left;">
					<b>根据预约时间查询:</b>
				</caption>

				<tr>
					<td>
						开始：
					</td>
					<td>
						<input type="text" id="startTimeHis" name="startTimeHis" class="Wdate" size="30" value="${startTime }"
							onFocus="WdatePicker({dateFmt:'yyyy-MM-dd 00:00:00', maxDate:'#F{$dp.$D(\'endTimeHis\',{m:-1});}' ,minDate:'#F{$dp.$D(\'endTimeHis\',{d:-15});}'})">
					</td>
					<td style="size: 20">
						结束：
					</td>
					<td style="size: 30">
						<input type="text" size="30" id="endTimeHis" name="endTimeHis" class="Wdate" value="${endTime}"
							onFocus="WdatePicker({dateFmt:'yyyy-MM-dd 23:59:59',minDate:'#F{$dp.$D(\'startTimeHis\',{m:1});}', maxDate:'#F{$dp.$D(\'startTimeHis\',{d:15});}'})">
					</td>
				</tr>

				<tr>
					<td colspan="2" align="right">
						<a href="#" class="easyui-linkbutton" iconCls="icon-search" id="searchPic">查询 - 以图表显示</a>
					</td>
					<td colspan="2">
						<a href="#" class="easyui-linkbutton" iconCls="icon-search" id="search">查询 - 以列表显示</a>
					</td>
				</tr>

			</table>
			<br>

			<div id="toshowContent" style="display: none">
				<table id="appointments">
				</table>
			</div>
			
			<div id="toshowContentPic" style="display: none;">
				
			</div>

			<div style="display: none">
				<table class="tab_b" width="100%" id="picTable" border="1" style="line-height:16px">
					<tr>
						<th>
							日期/小时
						</th>
						<th>
							00
						</th>
						<th>
							01
						</th>
						<th>
							02
						</th>
						<th>
							03
						</th>
						<th>
							04
						</th>
						<th>
							05
						</th>
						<th>
							06
						</th>
						<th>
							07
						</th>
						<th>
							08
						</th>
						<th>
							09
						</th>
						<th>
							10
						</th>
						<th>
							11
						</th>
						<th>
							12
						</th>
						<th>
							13
						</th>
						<th>
							14
						</th>
						<th>
							15
						</th>
						<th>
							16
						</th>
						<th>
							17
						</th>
						<th>
							18
						</th>
						<th>
							19
						</th>
						<th>
							20
						</th>
						<th>
							21
						</th>
						<th>
							22
						</th>
						<th>
							23
						</th>
					</tr>
				</table>
			</div>
		</div>

	</body>
</html>
